<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>业务管理</title>
<link href="css/base.css" rel="stylesheet" type="text/css" />
<script language="javascript">
//获得选中项
function getCheckboxItem()
{
	var allSel="";
	if(document.form1.aids.value) return document.form1.aids.value;
	for(i=0;i<document.form1.aids.length;i++)
	{
		if(document.form1.aids[i].checked)
		{
			if(allSel=="")
				allSel=document.form1.aids[i].value;
			else
				allSel=allSel+"`"+document.form1.aids[i].value;
		}
	}
	return allSel;
}
function ReSel()
{
	for(i=0;i<document.form1.aids.length;i++)
	{
		if(document.form1.aids[i].checked) document.form1.aids[i].checked = false;
		else document.form1.aids[i].checked = true;
	}
}
function DelSel()
{
	var nid = getCheckboxItem();
	if(nid==""){
		alert("请选择要删除的业务记录!\r\n");
		return ;
	}
	location.href = "member_do.php?dopost=deoperations&nid="+nid;
}
function UpSel()
{
	var nid = getCheckboxItem();
	if(nid==""){
		alert("请选择要更改的业务记录!\r\n");
		return ;
	}
	location.href = "member_do.php?dopost=upoperations&nid="+nid;
}
function OkSel()
{
	var nid = getCheckboxItem();
	if(nid==""){
		alert("请选择要更改的业务记录!\r\n");
		return ;
	}
	location.href = "member_do.php?dopost=okoperations&nid="+nid;
}function OpenMyWinN(surl,w,h){	window.open(surl, "popUpMyWinN", "scrollbars=yes,resizable=yes,statebar=no,width="+w+",height="+h+",left=200, top=100");}
</script>
</head>
<body background="images/allbg.gif" leftmargin='8' topmargin='8'>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cbd8ac;margin-bottom:5px;">
  <tr>
    <td height="30" align="center" bgcolor="#FAFCEF">
	<form name="form2" method="get" action="member_operations.php">
        <table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>输入订单号：</td>
            <td>
              <input name="buyid" type="text" id="buyid">
			  </td>	
			  <td>	
			  <select name="product" id="product" style="width:120px">
			  <option value="">产品类型</option>
			  <option value="archive">购买模板</option>	
			  <option value="shouyi">售出模板</option>
			  <option value="mb">购买定制</option>	
			  <option value="sell">售出定制</option>
			
			  
			  </select>	
			  </td>
            <td width="100" align="center"> <input name="imageField" type="submit" value="搜索" class='np coolbg' />
            </td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cfcfcf;">
  <tr>
    <td height="28" colspan="10" bgcolor="#EDF9D5" background='images/tbg.gif'>
    	<table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="30%" style="padding-left:10px;"><strong>会员消费管理：</strong> </td>
          <td width="45%" align="right" style="padding-top:4px;">
          	<input type="button" name="ss13" value="未付款" style="width:50px;margin-right:6px" onClick="location='member_operations.php?sta=0';" class='np coolbg' />
            <input type="button" name="ss14" value="已付款" style="width:50px;margin-right:6px" onClick="location='member_operations.php?sta=1';" class='np coolbg' />
            <input type="button" name="ss142" value="已完成" style="width:50px;margin-right:6px" onClick="location='member_operations.php?sta=2';" class='np coolbg' />
            <input type="button" name="ss16" value="全部" style="width:40px;margin-right:6px" onClick="location='member_operations.php';" class='np coolbg' />
          </td>
          <td width="25%" align="right" style="padding-top:4px;">
          	<input type="button" name="ss12" value="会员管理" style="width:90px;margin-right:6px" onClick="location='member_main.php';" class='np coolbg' />
          </td>
        </tr>
      </table></td>
  </tr>
  <tr bgcolor="#FBFCE2">
    <td width="4%" align="center">选择</td>
    <td width="25%" align="center">订单号</td>
    <td align="center">产品名称</td>
    <td width="10%" align="center">产品类型</td>
    <td width="16%" align="center">生成日期</td>
    <td width="4%" align="center">金额</td>

    <td width="8%" align="center">状态</td>
    <td width="10%" align="center">会员</td>
	<td width="4%" align="center">详情</td>
	<td width="4%" align="center">处理</td>
  </tr>
  <form name="form1">
{dede:datalist}
    <tr bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
      <td align="center">
<input type='checkbox' name='aids' value='<?php echo $fields['aid']?>' class='np'></td>
      <td align="center">
        <?php echo $fields['buyid']?>
      </td>
      <td align="center">
        <?php
        echo $fields['pname'].'('.$fields['oldinfo'].')';
        ?>
      </td>
      <td align="center">
        <?php echo GetPType($fields['product'])?>
      </td>
      <td align="center">
        <?php echo GetDateTimeMk($fields['mtime'])?>
        (<font color="#FF0000">{dede:field.mtime function="floorTime(time()-@me,@me)"/}</font>)
      </td>
      <td align="center">
        <?php echo $fields['money']?>
      </td>

      <td align="center">
        <?php echo GetSta($fields['sta'])?>
      </td>
      <td align="center">
        <?php if($fields['product']=='sell'){echo GetMemberID($fields['umid']);}else{echo GetMemberID($fields['mid']);}?>
      </td>
	  
	  <td align="center"><a href="javascript:OpenMyWinN('perations_view.php?aid=<?php echo $fields['aid']?>',680,450);" >详情</a></td>
	  <td align="center"><a href="member_operations.php?buyid=<?php echo $fields['buyid']?>&dopost=lock"><?php echo Glock($fields['glock'])?></a></td>
    </tr>
{/dede:datalist}
  </form>
  <tr>
    <td height="28" colspan="10" bgcolor="#FCFDF7" style="padding-top:4px;">
    	&nbsp;
      <input type="button" name="b7" value="反选" style="width:40" onClick="ReSel();" class='np coolbg' />
      <input type="button" name="b" value="删除" style="width:40" onClick="DelSel();" class='np coolbg' />
      <input type="button" name="b5" value="设为已付款状态" style="width:100" onClick="UpSel();" class='np coolbg' />
      <input type="button" name="b9" value="设为已完成状态" style="width:100" onClick="OkSel();" class='np coolbg' /></td>
  </tr>
  <tr>
    <td height="36" colspan="10" bgcolor="#F9FCEF" align="center">
     {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
    </td>
  </tr>
</table>
</body>
</html>